<?php
$rows = $this->tablelist;
include 'include_pagerform.php';
?>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" action="<?= $this->action ?>" method="post">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>名称查找：</td>
                    <td><input type="text" name="search[configclass.name]" value="<?= str($this->search['configclass.name']) ?>" /></td>
                    <td>所属分类：</td>
                    <td>
                        <select class="combox required" name="province">
                            <option value="">显示所有分类</option>
                        </select>
                    </td>
                    <td>
                        <div class="subBar">
                            <ul>
                                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
                                <li><a class="button" href="demo_page6.html" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
            </table>

        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a class="add" href="?c=<?= app::$CONTROLLER_NAME ?>&a=info&id=0" target="dialog" width="530" height="400" rel="sys_configclass_add"><span>添加</span></a></li>
            <li><a class="edit" href="?c=<?= app::$CONTROLLER_NAME ?>&a=info&id={id}" target="dialog" width="530" height="400" rel="sys_configclass_info"><span>修改</span></a></li>
            <li><a class="delete" href="?c=<?= app::$CONTROLLER_NAME ?>&a=del" target="selectedTodo" rel="ids" postType="string" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
        </ul>
    </div>
    <table class="table" layoutH="118" !targetType="dialog" width="100%">
        <thead>
            <tr align="center">
                <th width="22"><input type="checkbox" group="ids" class="checkboxCtrl" /></th>
                <th width="32"<?= $this->orderField("tablelist.id") ?>>ID</th>
                <th>状态</th>
                <th<?= $this->orderField("menuclass.name") ?>>菜单名称</th>
                <th<?= $this->orderField("menuclass.title") ?>>菜单标题</th>
                <th<?= $this->orderField("tablelist.field") ?>>列出字段</th>
                <th>默认排序</th>
                <th>单页最大</th>
                <th>显示页码</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <?php
            foreach ($rows as $row) {
                ?>
                <tr align="center" target="id" rel="<?= $row['id'] ?>">
                    <td><input name="ids" type="checkbox"></td>
                    <td><?= $row['id'] ?></td>
                    <?
                    if ($row['del_time'] != 0) {
                        echo '<td style="color:red">已删除</td>';
                    } else if ($row['enable'] != 1) {
                        echo '<td style="color:#AAAAAA">已禁用</td>';
                    } else {
                        echo '<td style="color:green">正常</td>';
                    }
                    ?>
                    <td><?= $row['menuclassname'] ?></td>
                    <td><?= $row['menuclasstitle'] ?></td>
                    <td align="left"><?= str::left($row['field'], 40) ?></td>
                    <td><?= $row['defaorder'] ?></td>
                    <td><?= $row['numperpage'] ?></td>
                    <td><?= $row['pagenumshown'] ?></td>
                    <td>
                        <a href="?c=<?= app::$CONTROLLER_NAME ?>&a=info&id=<?= $row['id'] ?>" class="btnEdit" rel="<?= app::$CONTROLLER_NAME ?>_info" target="dialog" width="530" height="350">编辑</a>
                        <a target="ajaxTodo" href="?c=<?= app::$CONTROLLER_NAME ?>&a=del&id=<?= $row['id'] ?>" class="btnDel" title="确定要删除吗?">删除</a>
                    </td>
                </tr>
                <?
            }
            ?>
        </tbody>
    </table>
    <?php
    include 'include_pagesbar.php';
    ?>
</div>